﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class vote_Vote : System.Web.UI.Page
{
    public string type = "vote";
    protected void Page_Load(object sender, EventArgs e)
    {

        if (Request["type"] != null)
            type = Request["type"].ToString();
        if (!IsPostBack)
        {
            TUser1.CheckUser(this);
            //RegisterStartupScript ("inijs","showlist('created',' top 5 ');showlist('joined',' top 5 ');");
            if ((this.Session["ecrm_email"] == null) || (this.Session["ecrm_email"].ToString() == ""))
            {
                userstatus1.Text = "你好，请 <a href=\"main.aspx\">登录</a>或 ";
                userstatus2.Text = "<a href=\"../user/user_reg.aspx\">注册</a>";
            }
            else
            {
                string sid = this.Session["ecrm_uid"].ToString();
                TUser oUser = new TUser(sid);
                oUser.Select();
                string bigname = oUser.BigName;

                userstatus1.Text = "<a onclick='javascript:location.href=\"../user/user_myself.aspx\"' onmouseover='this.style.cursor=\"pointer\"' onmouseout='this.style.backgroundColor=\"\"'>" + bigname + "的设置</a>";
                userstatus2.Text = "<a onclick='javascript:location.href=\"../user/user_logout.aspx\"' onmouseover='this.style.cursor=\"pointer\"' onmouseout='this.style.backgroundColor=\"\"'>退出</a>";
            }
        }

    }
}
